﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace davejk.Minecraft.ServerWrapper
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

DirCheck:
            Utils.SetupHelper.DirectoryCheckResponse DirCheckResponse = Utils.SetupHelper.CheckDirectories();
            switch (DirCheckResponse)
            {
                case Utils.SetupHelper.DirectoryCheckResponse.ErrorRetry:
                    goto DirCheck;
                case Utils.SetupHelper.DirectoryCheckResponse.ErrorAbort:
                    return;
            }

            if (Utils.CheckForJava.JavaWorks())
                Application.Run(new MainWindow());
            else
                return;
        }
    }
}
